home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 36 / qostnote.zip / ENVIRON.TEC < prev    next >
Text File  |  1988-04-19  |  4KB  |  91 lines

  1. DESQVIEW 2.0 TECHNICAL NOTE
  2.  
  3.                     Setting The Environment
  4.  
  5. When you open a window in DESQview that uses COMMAND.COM to load, 
  6. DESQview starts with the default COMMAND.COM environment. In this 
  7. new environment DESQview sets the COMSPEC to the default (the 
  8. drive you booted from) and then sets the DOS PATH as it was 
  9. before entering DESQview, adding the path of the "Command to 
  10. start program" (if any), and the DESQview subdirectory to the end 
  11. of the path.  The two extra entries are added to be sure that the 
  12. program will get loaded (in case the "Directory.:" is different 
  13. from the one used to load the program) and that any DESQview 
  14. loaders (LS-LOAD.COM for instance) will be found if needed.
  15.  
  16. At this point, the environment may be changed by the user.  
  17. Unlike DOS, the size of the environment is practically unlimited 
  18. (well, actually it's 32K) until a program (including a batch 
  19. file) is started.  Then the size of the environment is fixed at 
  20. the current value.  Any changes made will not have any effect on 
  21. any other DESQview windows.  This is all part of creating a 
  22. system in which the windows are autonomous.
  23.  
  24. SETTING ENVIRONMENT IN THE WINDOWS
  25.  
  26. If you need to have a special environment in your window (through 
  27. the use of the SET command for example), you may do so by 
  28. starting up your program with a batch file that first sets the 
  29. environment and then starts the program.  This generally works 
  30. just fine unless you need more environment space than is 
  31. available when the batch file is started.  If so then you run 
  32. "out of environment space".  This problem and its solution will 
  33. be discussed later in this document.
  34.  
  35. "INHERITING" ENVIRONMENT BY USING DESQVIEW'S LOADER
  36.  
  37. If you load your programs directly in DESQview, (see page 109 of 
  38. the DESQview Version 2 manual, bottom of the page), then the 
  39. programs will end up running with the environment that was 
  40. current in DOS before you ran DESQview.  The direct load feature 
  41. is automatically invoked whenever the "Command to start program" 
  42. contains a full, executable file specification (Example 123.EXE) 
  43. and the option "Close on exit to DOS" is set to "Y".  If your 
  44. program can be loaded in this fashion, set up your environment 
  45. before entering DESQview and directly load the program.  That is 
  46. all that need be done.  Programs loaded in this fashion also load 
  47. faster and have more memory available to them than those with the 
  48. extra COMMAND.COM overhead.
  49. DESQVIEW 2.0 TECHNICAL NOTE
  50.  
  51.  
  52. IF YOU RUN "OUT OF ENVIRONMENT SPACE"
  53.  
  54. If you have the problem of being out of environment space when 
  55. using a batch file which sets the environment in the window, 
  56. there are three possible solutions:
  57.  
  58. (1) Use a DESQview script
  59.  
  60.      Since a window started with COMMAND.COM can have its 
  61. environment space "grow" as needed, a DESQview script can be used 
  62. to make the necessary PATH and SET statements.  This can be 
  63. especially useful if you use an automatic startup script for the 
  64. window (see page 89).  The script does not need to be assigned to 
  65. an actual keyboard character (many people use {250} for this 
  66. script by HOLDING DOWN the Alt key and pressing 2 5 0 on the 
  67. keypad).  This script can set all the environment variables it 
  68. needs (maybe with variable pauses too), and then start the 
  69. program for you.
  70.  
  71. (2) Load COMMAND.COM as a program
  72.  
  73.      Since a program loaded directly by DESQview inherits the 
  74. environment which existed before DESQview was started, 
  75. COMMAND.COM can be loaded as the program and thus have the proper 
  76. variables set.  This is done by setting the "Command to start 
  77. program" to \COMMAND.COM and setting "Close on exit to DOS" to 
  78. "Y".  If you want a batch file to be started, then the 
  79. "Parameters" line may have "/C file.BAT", which starts the batch 
  80. file running.
  81.  
  82. (3) Using DOS 3.2 or 3.3 /E:n
  83.  
  84.      If you are using DOS 3.2 or higher then it is possible to 
  85. "load COMMAND.COM as a program" (as described in #2) and use then 
  86. "/E:n" parameter (where n is the size of the environment) to set 
  87. the size of the environment for that session of COMMAND.COM to a 
  88. larger value.
  89.  
  90.                  * * * *  END OF FILE  * * * *
  91.